package org.benjamin.lending.service.impl;

import org.benjamin.lending.domain.entity.BusinessInfo;
import org.benjamin.lending.repository.BusinessInfoRepository;
import org.benjamin.lending.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * Created by xywen on 2017/6/2.
 */
@Service("businessService")
public class BusinessServiceImpl implements BusinessService {

    @Autowired
    private BusinessInfoRepository businessInfoRepository;

    @Override
    public Page<BusinessInfo> findBusinessInfo(PageRequest pageRequest) {
        return this.businessInfoRepository.findAll(pageRequest);
    }

    @Override
    public void save(BusinessInfo businessInfo) {
        this.businessInfoRepository.save(businessInfo);
    }
}
